package com.SilenceEcho.pojo;

public class Jgw {


    String bjh;


    public Jgw(String bjh, int zh) {
        this.bjh = bjh;
        this.zh="";
        for (int i=100;i>0;i/=10){
            if (zh/i==0){
                this.zh+="0";
            } else {
                this.zh+=zh+"";
                break;
            }
        }
    }

    String zh;

    String zx;

    String xd;

    String zy;

    String jgw;

    String jw;

    String cxjb;

    String ks;

    String sw;

    String qxjb;



    public void setZx(String zx) {
        this.zx = zx;
    }



    public void setXd(String xd) {
        this.xd = xd;
    }



    public void setZy(String zy) {
        this.zy = zy;
    }

    public String match(String head){
        String before=bjh+zh;
        return switch (head) {
            case "甲骨文" -> {
                jgw = before + "jgw.svg";
                yield jgw;
            }
            case "金文" -> {
                jw = before + "jw.svg";
                yield jw;
            }
            case "楚系簡帛" -> {
                cxjb = before + "cxjb.svg";
                yield cxjb;
            }
            case "秦系簡牘" -> {
                qxjb = before + "qxjb.svg";
                yield qxjb;
            }
            case "說文" -> {
                sw = before + "sw.svg";
                yield sw;
            }
            case "楷書" -> {
                ks = before + "ks.svg";
                yield ks;
            }
            default -> null;
        };
    }
}
